css: Allow fractional letterspacing
authorMatthias Clasen <mclasen@redhat.com>
Sun, 10 Jul 2022 19:22:18 +0000 (15:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 10 Jul 2022 19:22:18 +0000 (15:22 -0400)
Something like letter-spacing: -0.5px make a lot of
sense. But we were handling the number as integer
somewhere, loosing the fractional part.

Fixes: #5034
gtk/gtkcssstyle.c

index f03d9b4f1a7038ed8fa25603f9875ffd820e567f..0822e80a4658596c5f7b7a0c0e38a55f4ca3daaf 100644 (file)
@@ -596,7 +596,7 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
   GtkTextDecorationStyle decoration_style;
   const GdkRGBA *color;
   const GdkRGBA *decoration_color;
-  int letter_spacing;
+  double letter_spacing;
 
   /* text-decoration */
   decoration_line = _gtk_css_text_decoration_line_value_get (style->font_variant->text_decoration_line);